<template>
  <div class="newsItem" @click="toDetail">
        <div class="newsDescribe">
          <div class="newsTitle">
            北京盈科(成都)律师事务所(以下简称"盈科成都")
          </div>
          <div class="newsDate">
            2021年08月27日
          </div>
        </div>
        <div class="img">
          <img src="../../static/images/article/1.png" alt="">
        </div>
  </div>
</template>

<script>
export default {
  name: "News",
  props:{
    news:{
      type:Object, //变量类型
      default:{
        id:0,
        title:"新闻标题",//新闻标题
        content:"新闻内容",//新闻内容
        date:"新闻日期",//新闻日期
        img:"新闻图片",//新闻图片
      }, //默认值
      require:true, //是否强制要求传值,默认是false
    }
  },
  data() {
    return {}
  },
  methods:{
    //跳转到详情页
    toDetail(){
      this.$router.push('/detail/'+this.news.id)
    }
  }
}
</script>

<style lang="less" scoped>
.newsItem{
  width: 355px;
  height: 96px;
  //background:green;
  display: flex;
  .newsDescribe{
    .newsTitle{
      width: 250px;
      height: 48px;
      font-size: 16px;
      font-family: PingFangSC-Semibold, PingFang SC;
      font-weight: 600;
      color: #333336;
      line-height: 24px;
      margin: 16px 8px 10px 0px;
    }
    .newsDate{
      width: 120px;
      height: 20px;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #999999;
      line-height: 20px;
      margin-left: 16px;
    }
  }
  .img{
    display: flex;
    margin-top: 10px;
    img{
      display: block;
      width: 94px;
      height: 72px;
    }
  }
}
</style>
